package com.itheima.dao;

import com.itheima.domain.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface UserDao {
    @Select("select * from user where username= #{username} and password = #{password}")
    User findUsernameAndPassword(@Param("username") String username, @Param("password") String password);

    @Insert("insert into user values(null,#{username},#{password})")
    Integer add(User user);

}
